#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2024/12/12 15:32
# @Author  : yingxiao zhang
# @File    : get_stock_list.py

import tushare as ts

# 使用自己的token，到官网申请
token = ''

ts.set_token(token)
pro = ts.pro_api()
# data = pro.query('stock_basic', exchange='', list_status='L')

data = pro.stock_basic(exchange='', list_status='L', fields='ts_code,symbol,name,area,industry,list_date')
data.to_csv("data/stock_list.csv")